//
//  HTTabBarController.m
//  今日话题
//
//  Created by lanou3g on 15/12/2.
//  Copyright © 2015年 郭海林. All rights reserved.
//

#import "HTTabBarController.h"
#import "HTNavigationController.h"

@interface HTTabBarController ()

@end

@implementation HTTabBarController


#pragma mark - controller 方法

- (void)viewDidLoad {
    [super viewDidLoad];
    // 初始化全部自控制器
    [self setupAllChildController];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - 自定义方法

- (void)setupAllChildController {
    // 初始化新闻控制器
    UIViewController *newsVC = [[UIViewController alloc] init];
    [self setupOneChildControllerWithViewController:newsVC image:[UIImage imageNamed:@"night_tabbar_icon_news_normal"] selectedImage:[UIImage imageNamed:@"night_tabbar_icon_news_highlight"] title:@"新闻"];
    // 初始化游戏控制器
    UIViewController *gameVC = [[UIViewController alloc] init];
    [self setupOneChildControllerWithViewController:gameVC image:[UIImage imageNamed:@"night_tabbar_icon_media_normal"] selectedImage:[uim] title:<#(NSString *)#>];
}

- (void)setupOneChildControllerWithViewController:(UIViewController *)vc image:(UIImage *)image selectedImage:(UIImage *)selectedImage title:(NSString *)title {
    vc.tabBarItem.image = image;
    vc.tabBarItem.selectedImage = selectedImage;
    vc.title = title;
    HTNavigationController *nav = [[HTNavigationController alloc] initWithRootViewController:vc];
    nav.title = title;
    [self addChildViewController:nav];
}
@end
